home *** CD-ROM | disk | FTP | other *** search
/ CD Actual 3 / CD ACTUAL 3.iso / linux / system / bsvc-1.000 / bsvc-1 / bsvc-1.0.4 / src / Framework / BreakpointList.hxx < prev    next >
Encoding:
Text File  |  1995-07-26  |  1.5 KB  |  57 lines

  1. ///////////////////////////////////////////////////////////////////////////////
  2. // $Id: BreakpointList.hxx,v 1.1 1994/02/18 19:49:26 bmott Exp $
  3. ///////////////////////////////////////////////////////////////////////////////
  4. // BreakpointList.hxx 
  5. //
  6. //   This class manages a list of breakpoints
  7. //
  8. //
  9. // BSVC "A Microprocessor Simulation Framework"
  10. // Copyright (c) 1993
  11. // By: Bradford W. Mott
  12. // November 23,1993
  13. //
  14. ///////////////////////////////////////////////////////////////////////////////
  15. // $Log: BreakpointList.hxx,v $
  16. // Revision 1.1  1994/02/18  19:49:26  bmott
  17. // Initial revision
  18. //
  19. ///////////////////////////////////////////////////////////////////////////////
  20.  
  21. #ifndef BREAKPOINTLIST_HXX
  22. #define BREAKPOINTLIST_HXX
  23.  
  24. class BreakpointList {
  25.   private:
  26.     // Structure for linked list of breakpoints
  27.     struct BreakpointNode {
  28.       unsigned long address;
  29.       BreakpointNode  *next;
  30.     };
  31.  
  32.     // Head of the linked list
  33.     BreakpointNode *head;
  34.  
  35.     // Tail of the linked list
  36.     BreakpointNode *tail;
  37.  
  38.   public:
  39.     BreakpointList();
  40.  
  41.     // Add a break point to the list
  42.     void Add(unsigned long address);
  43.  
  44.     // Delete a break point from the list (1=OK,0=ERROR)
  45.     int Delete(unsigned long address);
  46.  
  47.     // Return the number of breakpoints
  48.     int NumberOfBreakpoints();
  49.  
  50.     // Get the break point with the given index (1=OK,0=ERROR)
  51.     int GetBreakpoint(unsigned int index, unsigned long& address);
  52.  
  53.     // Check to see if the given address is a breakpoint (1=YES,0=NO)
  54.     int Check(unsigned long address);
  55. };
  56. #endif
  57.